<template>
    <transition
            @before-enter="beforeEnter"
            @enter="enter"
            @after-enter="afterEnter"
    ><slot></slot></transition>
</template>

<style scoped lang="stylus">
    .v-enter-active, .v-leave-active
        transition: all .6s linear
</style>

<script>
    export default {
        methods:{
            beforeEnter(el){
                console.log('before enter')
                el.style.transform='translateX(0)'
            },
            enter(el){
                this.ooh=document.body.offsetWidth
                el.style.transform='translateX(-400px)'
                console.log('enter'+ this.reflow)
            },
            afterEnter(){
                console.log('after enter')
            }
        }
    }
</script>